home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11259 < prev    next >
Encoding:
Text File  |  1996-08-05  |  587 b   |  25 lines

  1. Path: halon.vggas.com!news
  2. From: JYoungman@vggas.com (James Youngman)
  3. Newsgroups: comp.lang.c++
  4. Subject: mixing static and const qualifiers for class members
  5. Date: 13 Mar 1996 14:43:15 GMT
  6. Organization: VG Gas Analysis Systems
  7. Message-ID: <4i6mu3$pmg@halon.vggas.com>
  8. NNTP-Posting-Host: 132.147.163.4
  9. Mime-Version: 1.0
  10. Content-Type: Text/Plain; charset=US-ASCII
  11. X-Newsreader: WinVN 0.99.7
  12.  
  13. How do I declare and initialise a one-per-class constant?  I want to do 
  14. something like this:
  15.  
  16. class Foo
  17. {
  18.     static const int nPositions = 6;
  19.     int nData[nPositions];
  20. }
  21.  
  22. ...how is this done?
  23. James.
  24.  
  25.